module.exports = {
    /**
    * Application configuration section
    * http://pm2.keymetrics.io/docs/usage/application-declaration/
    */
    apps: [
        {
            name: 'trpc_server',
            script: './dist/main.js',
            autorestart: true,

            //集群模式
            //https://pm2.keymetrics.io/docs/usage/cluster-mode/
            // instances: "4",
            // exec_mode: "cluster",
            // shutdown_with_message: true,//win
            // kill_timeout: 30000,
            // wait_ready: true,
            // listen_timeout: 10000,

            // cron_restart: '0 3 * * *',//每天晚上3点重启
            // watch: ["./dist/Local/"],
            // max_memory_restart: "300M",
            error_file: "./logs/err.log",
            out_file: "./logs/out.log",
            time: true,
            log_date_format: "YYYY-MM-DD HH:mm Z",
            node_args: ["--max_old_space_size=128", "--max_semi_space_size=4"],
        },
    ]
}
